texture base_Tex;
sampler2D baseMap = sampler_state
{
   Texture = (base_Tex);
};
float red_value; 
float green_value; 
float blue_value; 
struct PS_INPUT 
{
   float2 Texcoord : TEXCOORD0;   
};
float4 Pixel_Shader_ps_main( PS_INPUT Input ) : COLOR0
{
   float4 pre_value = float4(0.0f,0.0f,0.0f,0.0f);
   float4 past_value = float4(0.0f,0.0f,0.0f,0.0f);
   pre_value = tex2D( baseMap, Input.Texcoord );
   float color = red_value * pre_value.x + green_value * pre_value.y + blue_value * pre_value.z;
   past_value.x=frac(color);
   past_value.y=frac(color);
   past_value.z=frac(color);
   return past_value;
}
technique GrayScale
{
   pass Pass_0
   {
      PixelShader = compile ps_2_0 Pixel_Shader_ps_main();
   }
}

